using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;

public class PlayerStateMachine
{
    public PlayerState currentState { get; private set; }//当前状态

    // 进入初始化状态
    public void Initialize(PlayerState _currentState)
    {
        currentState = _currentState;
        currentState.Enter();
    }

    // 修改状态
    public void ChangeState(PlayerState _newState)
    {
        currentState.Exit();
        currentState = _newState;
        currentState.Enter();
    }

}
